import { $t } from "@/plugins/i18n";
const Layout = () => import("@/layout/index.vue");
const CustomerServiceLayout = () => import("@/layout/customer-service.vue");

export default [
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: $t("menus.pureLogin"),
      showLink: false,
      rank: 101
    }
  },
  {
    path: "/redirect",
    component: Layout,
    meta: {
      title: $t("status.pureLoad"),
      showLink: false,
      rank: 102
    },
    children: [
      {
        path: "/redirect/:path(.*)",
        name: "Redirect",
        component: () => import("@/layout/redirect.vue")
      }
    ]
  },
  // 下面是一个无layout菜单的例子（一个全屏空白页面），因为这种情况极少发生，所以只需要在前端配置即可（配置路径：src/router/modules/remaining.ts）
  {
    path: "/empty",
    name: "Empty",
    component: () => import("@/views/empty/index.vue"),
    meta: {
      title: $t("menus.pureEmpty"),
      showLink: false,
      rank: 103
    }
  },
  {
    path: "/account-settings",
    name: "AccountSettings",
    component: () => import("@/views/account-settings/index.vue"),
    meta: {
      title: $t("buttons.pureAccountSettings"),
      showLink: false,
      rank: 104
    }
  },
  // 方舟客服工作台 - 使用自定义布局（保留导航栏，无侧边栏）
  {
    path: "/customer-service",
    component: CustomerServiceLayout,
    redirect: "/customer-service/inbox",
    meta: {
      title: "方舟客服工作台",
      showLink: false,
      rank: 105
    },
    children: [
      {
        path: "inbox",
        name: "CustomerServiceInbox",
        component: () => import("@/views/customer-service/inbox/index.vue"),
        meta: {
          title: "收件箱",
          icon: "ep:chat-dot-round"
        }
      },
      {
        path: "dashboard",
        name: "CustomerServiceDashboard",
        component: () => import("@/views/customer-service/dashboard/index.vue"),
        meta: {
          title: "方舟面板",
          icon: "ep:data-analysis"
        }
      },
      {
        path: "rooms",
        name: "ChatRoomManagement",
        component: () => import("@/views/customer-service/rooms/index.vue"),
        meta: {
          title: "聊天室管理",
          icon: "ri:chat-3-line"
        }
      },
      {
        path: "settings",
        name: "CustomerServiceSettings",
        component: () => import("@/views/customer-service/settings/index.vue"),
        meta: {
          title: "设置",
          icon: "ep:setting"
        }
      }
    ]
  }
] satisfies Array<RouteConfigsTable>;
